Ext.define('CDR.view.report.TariffReportEntityTree', {
	extend: 'Ext.menu.Menu',
	alias: 'widget.tariff-call-report-entity-tree',
	initComponent: function(){
		var me = this;
		me.callParent(arguments);
		
	},
	height: 500,
	width: 350,
	title: 'Select entity',
	target: null,
	items:[{
		xtype: 'treepanel',
		rootVisible: false,
		height: 468,
		width: 345,
		layout: 'fit',
		hideHeaders: true, 
		viewConfig: { toggleOnDblClick: false },
		store: Ext.create('CDR.store.report.ReportEntityTreeStore'),
		autoScroll: true,
		columns: [
            { header: 'Entity', dataIndex: 'text', xtype: 'treecolumn', flex: 1 },
            { 
            	header: 'Select',
            	xtype: 'componentcolumn', 
            	dataIndex: 'Disabled', 
            	width: 50,
            	align: 'center',
            	renderer: function (value, metadata, record, rowIndex, colIndex, store, grid) {
            		//if(record.data.type =="contact"){
            			return {
	                        xtype: 'checkbox',
	                        checked: record.data.selectContact
	                    };	
            		//}
            	} 
            }
        ]
	}]
});